import {NgModule} from "@angular/core";
import {RouterModule, Routes} from "@angular/router";
import {SharedModule} from "../../shared/shared.module";

import {SampleListComponent} from "./sample-list/sample-list.component";
import {SampleDetailComponent} from "./sample-detail/sample-detail.component";
import {SampleEditComponent} from "./sample-edit/sample-edit.component";

const routes: Routes = [
            {path: '', redirectTo: 'list'},
        {path: 'list', component: SampleListComponent},
        {path: 'add', component: SampleEditComponent},
        {path: 'modify/:code', component: SampleEditComponent},
        {path: 'detail/:code', component: SampleDetailComponent}
]

@NgModule({
  imports: [
    SharedModule.forRoot(),
    RouterModule.forChild(routes)
  ],
  declarations: [
    SampleListComponent,
    SampleDetailComponent,
    SampleEditComponent
  ],
  providers: []
})
export class SampleModule {
}
